imports('../../../style/initialize/setting');

return {
    body:renders({
        <%include 'head'%>
        <div class="m-main-body m-setting f-oa">
            <%include 'form'%>
        </div>
    }),
    tools:'',
    form:renders({
        <form class="ui-form">
            <fieldset class="f-clearfix">
                <legend class="f-fl">基础信息</legend>
                <div class="main f-fr">
                    <div class="inner">
                        <div class="ui-item">
                            <label class="ui-label f-lh35">公司名称</label>
                            <input type="text" class="ui-input ui-input-large g-w60" name="" autocomplete="off">
                            <em class="ui-err"></em>
                        </div>
                        <div class="ui-item">
                            <label class="ui-label f-lh35">本位币</label>
                            <input type="text" class="ui-input ui-input-large g-w60" readonly value="RMB" name="" autocomplete="off">
                            <em class="ui-err"></em>
                        </div>
                        <div class="ui-item">
                            <label class="ui-label f-lh35">启用期间</label>
                            <input type="text" class="ui-input ui-input-large g-w60" readonly value="<%account.date??%>" name="date" autocomplete="off">
                            <em class="ui-err"></em>
                        </div>
                        <div class="ui-item">
                            <label class="ui-label f-lh35">会计制度</label>
                            <select data-css="width:60%;" name="accounting" class="f-dn">
                                <option value="0">小企业会计准则(2013版)</option>
                                <option value="1">企业会计准则(2007版)</option>
                            </select>
                            <em class="ui-err"></em>
                        </div>
                    </div>
                </div>
            </fieldset>
            <fieldset class="f-clearfix e-pt10">
                <legend class="f-fl">科目参数</legend>
                <div class="main f-fr">
                    <%var _size = size.split(',')%>
                    <div class="inner level<%_size.length%>">
                        <div class="ui-item">
                            <label class="ui-label f-lh35">科目级次</label>
                            <select name="level" data-css="max-width:110px;" class="f-dn" data-value="<%level??%>">
                                <%var levels = new Array(6)%>
                                <%each levels%>
                                <%var number = $index+4%>
                                <%if (level?? && number >= number) || !level??%>
                                <option value="<%number%>"><%number%></option>
                                <%/if%>
                                <%/each%>
                            </select>
                            <b class="f-lh35 f-corange e-ml10">
                                <i class="iconfont f-fs16 e-mr5">&#xe608;</i>
                                科目级次调大后，不能再调小（即：不能恢复到调整前级次），请谨慎操作。
                            </b>
                        </div>
                        <div class="ui-item level-wrap">
                            <label class="ui-label f-lh35">编码长度</label>
                            <input type="text" name="length" value="<%_size[0]%>" readonly autocomplete="off" class="ui-input ui-input-large ui-input-scale f-tac">
                            <%each _size%>
                            <%if $index > 0%>
                            <b class="f-lh35 e-ml5 e-mr5">-</b>
                            <input type="text" name="length" value="<%$value%>" data-integer="1" data-decimal="0" data-min="<%$value%>" autocomplete="off" class="ui-input ui-input-large ui-input-scale f-tac">
                            <%/if%>
                            <%/each%>
                        </div>
                    </div>
                </div>
            </fieldset>
            <fieldset class="f-clearfix">
                <legend class="f-fl">凭证日期设置</legend>
                <div class="main f-fr">
                    <div class="inner e-pt10">
                        <div class="ui-item">
                            <span class="checkbox">
                                <span class="ui-checkradio">
                                    <input type="radio" name="a" value="1">
                                    <b class="e-pl10">系统日期</b>
                                </span>
                            </span>
                            <span class="ui-checkradio">
                                <input type="radio" name="a" value="3">
                                <b class="e-pl10">最后一张凭证保存日期</b>
                            </span>
                        </div>
                    </div>
                </div>
            </fieldset>
            <fieldset class="f-clearfix">
                <legend class="f-fl">凭证审核设置</legend>
                <div class="main f-fr">
                    <div class="inner e-pt10">
                        <div class="ui-item">
                            <span class="checkbox">
                                <span class="ui-checkradio">
                                    <input type="radio" name="verify" value="1">
                                    <b class="e-pl10">结账不需要审核</b>
                                </span>
                            </span>
                            <span class="ui-checkradio">
                                <input type="radio" name="verify" value="2">
                                <b class="e-pl10">结账需要审核</b>
                            </span>
                        </div>
                        <div class="ui-item">
                            <span class="checkbox">&nbsp;</span>
                            <span class="ui-checkradio">
                                <input type="checkbox" name="w" value="1" disabled>
                                <b class="e-pl10">制单人和审核人不能为同一人</b>
                            </span>
                        </div>
                    </div>
                </div>
            </fieldset>
            <fieldset class="f-clearfix">
                <legend class="f-fl">结转损益设置</legend>
                <div class="main f-fr">
                    <div class="inner e-pt10">
                        <div class="ui-item">
                            <span class="checkbox">
                                <span class="ui-checkradio">
                                    <input type="radio" name="v" value="1">
                                    <b class="e-pl10">收入成本分开结转</b>
                                </span>
                            </span>
                            <span class="ui-checkradio">
                                <input type="radio" name="v" value="3">
                                <b class="e-pl10">损益凭证为一张</b>
                            </span>
                        </div>
                    </div>
                </div>
            </fieldset>
            <fieldset class="f-clearfix e-mt20 e-pt10">
                <legend class="f-fl">&nbsp;</legend>
                <div class="main f-fr">
                    <div class="inner e-pt10">
                        <button type="button" class="ui-button ui-button-normal">保存</button>
                    </div>
                </div>
            </fieldset>
        </form>
    }),
    levels:renders({
        <%each $list%>
        <%include 'level'%>
        <%/each%>
    }),
    level:renders({
        <b class="f-lh35 e-ml5 e-mr5">-</b>
        <input type="text" name="length" autocomplete="off" data-integer="1" data-decimal="0" value="2" class="ui-input ui-input-large ui-input-scale f-tac">
    })
}